package com.wms.ymcc.web.controller;

import com.wms.ymcc.result.JSONResult;
import com.wms.ymcc.service.VerifyCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : 阿盛哟
 * @description : 验证码控制器
 * @createDate : 2025/5/29 14:42
 */
@RestController
@RequestMapping("/verifycode")
public class VerifyCodeController {

    @Autowired
    private VerifyCodeService verifyCodeService;
    /**
     * 发送短信验证码
     */
    @GetMapping("/sendSmsCode/{mobile}")
    public JSONResult sendSmsCode(@PathVariable("mobile") String mobile) {

        // 调用service层发送
        verifyCodeService.sendSmsCode(mobile);

        return JSONResult.success();
    }
}